package com.hx.xiao.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.hx.xiao.entity.Fan;
import com.hx.xiao.entity.Hou;
import com.hx.xiao.mapper.FanMapper;
import com.hx.xiao.mapper.HouMapper;
import com.hx.xiao.service.IFanService;
import com.hx.xiao.service.IHouService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FanServiceImpl extends ServiceImpl<FanMapper, Fan> implements IFanService {

    @Autowired
    private FanMapper fanMapper;

    @Override
    public int addById(Fan fan) {
        return fanMapper.addById(fan);
    }

    @Override
    public List<Fan> findAll(Integer uid) {
        return fanMapper.findAll(uid);
    }

    @Override
    public List<Fan> findAllBy() {
        return fanMapper.findAllBy();
    }

    @Override
    public Fan findById(Integer id) {
        return fanMapper.findByIdFan(id);
    }

    @Override
    public int DeleteById(Integer id) {
        return fanMapper.deleteById(id);
    }

    @Override
    public int updateByIdi(Fan fan) {
        return fanMapper.updateByIdii(fan);
    }
}
